home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.text.html;
-
- import javax.swing.text.AttributeSet;
- import javax.swing.text.html.HTML.Attribute;
-
- public class Option {
- private boolean selected;
- private String label;
- private AttributeSet attr;
-
- public Option(AttributeSet var1) {
- this.attr = var1.copyAttributes();
- this.selected = var1.getAttribute(Attribute.SELECTED) != null;
- }
-
- public AttributeSet getAttributes() {
- return this.attr;
- }
-
- public String getLabel() {
- return this.label;
- }
-
- public String getValue() {
- String var1 = (String)this.attr.getAttribute(Attribute.VALUE);
- if (var1 == null) {
- var1 = this.label;
- }
-
- return var1;
- }
-
- public boolean isSelected() {
- return this.selected;
- }
-
- public void setLabel(String var1) {
- this.label = var1;
- }
-
- protected void setSelection(boolean var1) {
- this.selected = var1;
- }
-
- public String toString() {
- return this.label;
- }
- }
-